<%@ page language="java" import="java.util.*" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@include file="/context/mytags.jsp"%>
<!DOCTYPE html>
<html>
 <head>
  <title>保证金设置</title>
  <t:base type="jquery,easyui,tools,DatePicker"></t:base>
 </head>
 <script type="text/javascript">

	 $(document).ready(function(){
	 	isMeans("${config.means}");
	 });

	 //下拉框值发生变化的时候调用函数
	 function isMeans(value){
		 //var isInter = cthis.value;
		 if (value==0) {
			 $("#amount_id").show();
			 $("#rate_id").hide();
		 }else {
			 $("#amount_id").hide();
			 $("#rate_id").show();
		 }
	 }
 </script>



 <body>
		<t:formvalid formid="formobj" dialog="true" usePlugin="password" layout="table" action="bzjConfigController.do?doUpdate" >
					<input id="id" name="id" type="hidden" value="${config.id }"/>
			        <input id="modeid" name="modeid" type="hidden" value="${config.modeid }"/>
			        <input id="modename" name="modename" type="hidden" value="${config.modename }"/>
		<table style="width: 600px;" cellpadding="0" cellspacing="1" class="formtable">
				<tr>
					<td align="right">
						<label class="Validform_label">
							是否启用:
						</label>
					</td>
					<td class="value">
						<t:dictSelect field="enable" type="list"   typeGroupCode="BZJ_ENABLE"  defaultVal="${config.enable}" hasLabel="false"  title="是否启用" ></t:dictSelect>
						<span class="Validform_checktip"></span>
						<label class="Validform_label" style="display: none;">是否启用</label>
					</td>
				</tr>
					<tr>
						<td align="right">
							<label class="Validform_label">
								交易模式:
							</label>
						</td>
						<td class="value">
							${config.modename}
						</td>
					</tr>
			<tr>
				<td align="right">
					<label class="Validform_label">
						收取方式:
					</label>
				</td>
				<td class="value">
					<t:dictSelect field="means" type="list"   typeGroupCode="BZJ_MEANS"  defaultVal="${config.means}" hasLabel="false"  title="收取方式" extendJson="{onchange:'isMeans(this.value)'}"></t:dictSelect>
					<span class="Validform_checktip"></span>
					<label class="Validform_label" style="display: none;">收取方式</label>
				</td>
			</tr>
			<tr>
				<td align="right">
					<label class="Validform_label">
						收取目标:
					</label>
				</td>
				<td class="value">
					<t:dictSelect field="target" type="list"    typeGroupCode="BZJ_TARGET"  defaultVal="${config.target}" hasLabel="false"  title="收取目标" ></t:dictSelect>
					<span class="Validform_checktip"></span>
					<label class="Validform_label" style="display: none;">收取目标</label>
				</td>
			</tr>
			<tr id="amount_id">
				<td align="right">
					<label class="Validform_label">
						收取金额:
					</label>
				</td>
				<td class="value">
					<input id="amount" name="amount" type="text"  maxlength="30" style="width: 150px"   value='${config.amount}'/>(单位：元)
				</td>
			</tr>
			<tr id="rate_id">
				<td align="right">
					<label class="Validform_label">
						收取比例:
					</label>
				</td>
				<td class="value">
					<t:dictSelect field="rate" type="list"    typeGroupCode="BZJ_RATE"  defaultVal="${config.rate}" hasLabel="false"  title="收取比例" ></t:dictSelect>
					<span class="Validform_checktip"></span>
					<label class="Validform_label" style="display: none;">收取比例</label>
				</td>
			</tr>
			<tr>
				<td align="right">
					<label class="Validform_label">
						备注:
					</label>
				</td>
				<td class="value">
					1、固定保证金：收取金额按收取金额收取。<br>
					2、比例保证金：收取金额按报单总金额*收取比例收取。
				</td>
			</tr>
			</table>
		</t:formvalid>
 </body>
